package com.ytjj.qmyx.admin.mapper;

import com.ytjj.qmyx.admin.model.Menu;
import com.ytjj.qmyx.admin.model.Permission;
import com.ytjj.qmyx.admin.model.Role;
import com.ytjj.qmyx.admin.model.RoleExample;
import java.util.List;
import com.ytjj.qmyx.admin.model.request.RoleRequest;
import org.apache.ibatis.annotations.Param;

public interface RoleMapper {
    long countByExample(RoleExample example);

    int deleteByExample(RoleExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Role record);

    int insertSelective(Role record);

    List<Role> selectByExample(RoleExample example);

    Role selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Role record, @Param("example") RoleExample example);

    int updateByExample(@Param("record") Role record, @Param("example") RoleExample example);

    int updateByPrimaryKeySelective(Role record);

    int updateByPrimaryKey(Role record);

    List<Permission> getPermissionListById(Integer roleId);

    List<Menu> getMenuListById(Integer roleId);

    List<Role> selectRoleList(RoleRequest roleRequest);

    List<Integer> selectCheckedIds(Integer roleId);

    int deleteIsExist(Integer id);

    int RoleList(Integer id);

    int updateStatusById(Integer id, Integer status);

    List<Role> selectRole(@Param("roleName")String roleName, @Param("status") Byte status,@Param("departmentId") Integer departmentId);

    List<Role> selectAll(Integer roleId);

    List<Role> selectByRoleCode(String roleCode);

    List<Role> selectByRoleName(String roleName);

    List<Integer> findAdminId();

    Integer deleteAll(@Param("ids") List<Integer> ids);

//    List<RoleUseDto> RoleListByIds(@Param("ids") List<Integer> ids);

}